package com.services.facade;


import com.services.domain.Departments;

import java.util.List;

import javax.ejb.Remote;
import javax.ejb.Stateless;

import javax.interceptor.Interceptors;

import com.services.service.EnterpriseService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor;

@Stateless(name = "EnterpriseSessionFacade", mappedName = "ejb/EnterpriseSessionFacade")
@Remote
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class EnterpriseSessionFacadeBean implements EnterpriseSessionFacade {
    
    @Autowired
    private EnterpriseService enterpriseService;
    
//    public Departments findByDepartmentId(long deptId){
//        return enterpriseService.findByDepartmentId(deptId);
//        
//    }
    
    public List<Departments> findAllDepartments() {
        return enterpriseService.findAllDepartments();    
    }
}
